package java7_24;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.stream.Collectors;
import java.util.stream.Stream;

public class Sreamzuoye6 {
	public static void main(String[] args) {
		int[] arr={1,2,3};
		int[] arrb={4,5,3,2};
		int[] data=new int[arr.length+arrb.length];
		System.arraycopy(arr, 0, data, 0, arr.length);
		System.arraycopy(arrb, 0, data, arr.length, arrb.length);
		System.out.println(Arrays.toString(data));
		LinkedHashMap<Integer,Integer> map=new LinkedHashMap<Integer,Integer>();
		List<Integer> collect = Arrays.stream(arr).boxed().collect(Collectors.toList());
		List<Integer> collect2 = Arrays.stream(arrb).boxed().collect(Collectors.toList());
		Stream<Integer> filter = collect.stream().filter(t->!collect2.contains(t));
		Stream<Integer> filter2 = collect2.stream().filter(t->!collect.contains(t));
		List<Integer> collect3 = Stream.concat(filter, filter2).collect(Collectors.toList());
		System.out.println(collect3);
	}
}
